ConvText allows you to do extensive search-and-replace operations on any kind of file, by means of scripts that can be created easily.